﻿using AutoMapper;
using B.S.Packaged.Domain;
using B.S.Packaged.Domain.Tree;
using B.S.Packaged.WebAPI.Write.Applications.Commands.CompletedfinishedCommand;
using B.S.Packaged.WebAPI.Write.Applications.Commands.CompletedStorageCommand;
using B.S.Packaged.WebAPI.Write.Applications.Commands.Equipment;
using B.S.Packaged.WebAPI.Write.Applications.Commands.MaterialPreparation;
using B.S.Packaged.WebAPI.Write.Applications.Commands.MonitorCommand;
using B.S.Packaged.WebAPI.Write.Applications.Commands.PackagingPlanCommands;
using B.S.Packaged.WebAPI.Write.Applications.Commands.PackagingQualityCommand;
using B.S.Packaged.WebAPI.Write.Applications.Commands.ProductionLine;
using B.S.Packaged.WebAPI.Write.Applications.Commands.ReportCommand;
using B.S.Packaged.WebAPI.Write.Applications.Commands.TeamCommands;
using B.S.Packaged.WebAPI.Write.Applications.Commands.WorkSection;
using B.S.Packaged.WebAPI.Write.Applications.Commands.Workshop;

namespace B.S.Packaged.WebAPI.Write
{
    public class MappingFiles : Profile
    {
        public MappingFiles()
        {
            //包装计划
            CreateMap<PackagingPlan, AddPackagingPlanCommands>().ReverseMap();
            CreateMap<PackagingPlanDetails, AddPackagingPlanDetailsCommand>().ReverseMap();
            CreateMap<PackagingPlanDetails, UpdatePackagingPlanDetailsCommands>().ReverseMap();
            CreateMap<PackagingPlan, UpdatePackagingPlanCommands>().ReverseMap();
            CreateMap<MaterialPreparation, B.S.Packaged.WebAPI.Write.Applications.Commands.PackagingPlanCommands.AddMaterialPreparationCommand>().ReverseMap();
            CreateMap<UpdatePickingCommand, PackagingPlan>().ReverseMap();

            //完工入库
            CreateMap<CompletedStorage, AddCompletedStorageCommand>().ReverseMap();
            CreateMap<CompletedStorage, DelCompletedStorageCommand>().ReverseMap();
            CreateMap<CompletedStorage, UpdateCompletedStorageCommand>().ReverseMap();


            //包装成品完工表

            CreateMap<Completedfinished, AddCompletedfinishedCommand>().ReverseMap();
            CreateMap<Completedfinished, DelCompletedfinishedCommand>().ReverseMap();
            CreateMap<Completedfinished, UpdateCompletedfinishedCommand>().ReverseMap();


            CreateMap<Equipment_Information, AddEquipmentCommand>().ReverseMap();


            //交接班
            CreateMap<Team, CreateTeamCommands>().ReverseMap();
            CreateMap<Team, UpdTeamCommands>().ReverseMap();

            //过程监控
            CreateMap<MonitorModel, CreateMonitorCommand>().ReverseMap();
            CreateMap<MonitorModel, UpdMonitorCommand>().ReverseMap();

            //包装成品完工表

            CreateMap<PackagingQuality, AddPackagingQualityCommand>().ReverseMap();
            CreateMap<PackagingQuality, DelPackagingQualityCommand>().ReverseMap();
            CreateMap<PackagingQuality, UpdatePackagingQualityCommand>().ReverseMap();

            CreateMap<WorkSection, AddWorkSectionCommand>().ReverseMap();
            CreateMap<Workshop, AddWorkshopCommand>().ReverseMap();

            CreateMap<MaterialPreparation, B.S.Packaged.WebAPI.Write.Applications.Commands.MaterialPreparation.AddMaterialPreparationCommand>().ReverseMap();
            CreateMap<MaterialPreparation, DeleteMaterialPreparationCommand>().ReverseMap();
            CreateMap<MaterialPreparation, UpdateMaterialPreparationCommand>().ReverseMap();
            //报工
            CreateMap<Report, CreateReportCommand>().ReverseMap();
            CreateMap<Report, UpdReportCommand>().ReverseMap();


            //车间/工段/产线/设备
            CreateMap<Workshop, AddWorkshopCommand>().ReverseMap();
            CreateMap<WorkSection, AddWorkSectionCommand>().ReverseMap();
            CreateMap<ProductionLine, AddProductionLineCommand>().ReverseMap();
            CreateMap<Equipment_Information, AddEquipmentCommand>().ReverseMap();

        }
    }
}
